1. Field of the Invention
The present invention relates to a microcomputer, and more specifically to a microcomputer which processes periodically inputted data.
2. Description of Related Art
Hitherto, a typical example of microcomputers which process periodically inputted data has been a so-called digital signal processor. Conventional digital signal processors, particularly, audio digital signal processors, have been configured to receive a digital signal obtained by digitizing an audio signal by a predetermined sampling frequency (f.sub.s) and to perform a multiplication and addition operation for the received digital signal in order to filter the received digital signal.
In an ordinary practice, the filtering due to the multiplication and addition operation is repeated at a constant sampling period 1/f.sub.s, and therefore, a time required for execution of the multiplication and addition operation must be less than the sampling period 1/f.sub.s. For example, in a digital signal processor for a audio signal digitized at a sampling frequency f.sub.s of 44.1 KHz, a filtering operation is executed with a time not larger than the sampling period 1/f.sub.s of 22.7 .mu.s, and repeated at an interval of 22.7 .mu.s.
In the above mentioned digital signal processors, there is a demand of modifying a processing mode of the filtering operation without interrupting or discontinuing of the filtering operation. For example, in the audio purpose digital signal processor used in audio instruments, tone can be adjusted by modifying the characteristics of the filtering acted on the audio signal. This modification of the filtering characteristics can be attained by modifying coefficients of the multiplications and additions for realizing the filtering processing. For this purpose, the conventional digital signal processors have two memories for storing the coefficients of the multiplications and additions, so that when the multiplications and additions are executed by using the coefficients stored in one of the two memories, it is possible to rewrite the coefficients stored in the other memory.
For example, in an audio purpose digital signal processor having a first coefficient memory and a second coefficient memory, when the filtering operation is being executed by using the first coefficient memory, a content of the second coefficient memory is rewritten, and after the rewriting of the second coefficient memory has been completed, the second coefficient memory is put in a condition accessed for the filtering operation, in place of the first coefficient memory, so that it becomes possible to rewrite the first coefficient memory. Thereafter, if it becomes necessary to modify the coefficients for the filtering, again, when the filtering operation is being executed by using the second coefficient memory, the first coefficient memory is rewritten. After the rewriting of the first coefficient memory has been completed, the memory accessed for the filtering operation is switched from the second coefficient memory to the first coefficient memory, so that the first coefficient memory is accessed for the filtering operation.
Here, the switching between the first and second coefficient memories is performed at a timing within a time period from the completion of one filtering operation repeated at the sampling interval f.sub.s before a start of a next filtering operation. If the switching of the coefficient memories is attained at the above timing, the coefficients for the filtering can be modified without interrupting or discontinuing the filtering processing. In other words, the tone can be adjusted without chopping or breaking the sound.
However, the audio purpose digital signal processor having two coefficient memories consequently requires a large memory capacity. In general, since the digital signal processor is required to access the coefficient memory at a very high speed, an execution unit for the multiplication and addition and the coefficient memories are needed to be assembled on the same LSI chip. In addition, the rewritable coefficient memories must be formed of a random access memory (RAM) which ordinarily needs a chip area ten times that of a read only memory (ROM). As a result, the conventional digital signal processor has been required to include, in the LSI chip, a RAM having a capacity larger than the memory capacity required and sufficient for storing the coefficients for the filtering operation. Accordingly, the ratio of the RAM area to the chip area has gradually increased with years, and the chip area itself gradually increased. However, the increase of the chip area will result in increase of the cost and in decrease of yield.